<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p>父：</p> 
        <span>钱：{{wealth.money}}</span>
        <span>房：{{wealth.house}}</span>
        <span>车：{{wealth.car}}</span>
        <p>子：</p>
        <son :fromf="wealth"></son>
    </div>
    <template id='son'>
        <div>
            <span>money:{{fromf.money}}</span>
            <span>house:{{fromf.house}}</span>
            <span>car:{{fromf.car}}</span>
        </div>
    </template>
    <script src="../vue.js"></script>
    <script>
        let son={
            template:'#son',
            props: ['fromf']
        }
        new Vue({
            el:'#app',
            data () {
                return {
                    wealth:{
                        money:1000000,
                        house:"bigs",
                        car:'lots',
                    }
                }
            },
            components: {
                son,
            }
        })
    </script>
</body>
</html>